<template>
    <div></div>
</template>

<script>
import * as Rx from 'rxjs'
import {share, shareReplay} from 'rxjs/operators'
export default {
    mounted(){
        const cold = new Rx.Observable(o => o.next(Math.random())).pipe(shareReplay())
        cold.subscribe(console.log)
        cold.subscribe(console.log)
    }
}
</script>